import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '@/views/Home/index.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'Home',
    redirect: "/content"
  },
  {
    path: '/content',
    component: Home,
    children: [
      {
        path: '/content',
        name: 'content',
        component: () => import("@/views/Home/content")
      },
      {
        path: '/userInfo',
        name: 'userInfo',
        component: () => import("@/views/users/userInfo.vue")
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import("@/views/users/login.vue")
  },
  {
    path: '/register',
    name: 'register',
    component: () => import("@/views/users/register.vue")
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
